<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>天使</title>

    <style>
        img {
            position: absolute;
        }
    </style>


</head>

<body>

    <img src="images/angel.gif" alt="">



</body>
<script>
    var img = document.querySelector('img');
    document.addEventListener('mousemove', function(e) {
        img.style.top = e.pageY - 20 + 'px';
        img.style.left = e.pageX - 20 + 'px';


    })
</script>

</html>